/*
*    Phantom v2.0 GUI Automation Software
*    Copyright (C) 2009  John C. Van Arsdall (john@phantomtest.com)
*
*    This program is free software; you can redistribute it and/or modify
*    it under the terms of the GNU General Public License as published by
*    the Free Software Foundation; either version 2 of the License, or
*    (at your option) any later version.
*
*    This program is distributed in the hope that it will be useful,
*    but WITHOUT ANY WARRANTY; without even the implied warranty of
*    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
*    GNU General Public License for more details.
*
*    You should have received a copy of the GNU General Public License along
*    with this program; if not, write to the Free Software Foundation, Inc.,
*    51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*
*/
// DataArray.h: interface for the CDataArray class.
//
//////////////////////////////////////////////////////////////////////

#if !defined(AFX_DATAARRAY_H__5CEBBB03_5697_45BF_BE31_0221DE8901FA__INCLUDED_)
#define AFX_DATAARRAY_H__5CEBBB03_5697_45BF_BE31_0221DE8901FA__INCLUDED_

#include "ssi_status.h"	// Added by ClassView
#include "ssi_ptrarray.h"	// Added by ClassView
#include "ssi_data.h"
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000

class SSI_SCRIPTDLL_API CDataArray  
{
public:
	SSI_INT64 GetAccessCtr();
	SSI_INT64 Decrement();
	SSI_INT64 Increment();
	SSI_INT64 GetNumElems();
	DimNode InitializeDimensions();
	CData& GetData(DimNode Dim);
	CData* GetData(SSI_INT64 Ind);

	CStatus AddData(const String &sData, DimNode Dim);
  CStatus AddData(CData* aData, DimNode Dim, SSI_BOOL bDoClone = 1);
	void CopyArray(CDataArray &In);

  typedef SSI_CPtrArray<CData*> DataArray;
  DataArray array;
	SSI_INT64 Type;

  CDataArray& operator =(CDataArray &Other);

	CDataArray();
	CDataArray(CDataArray& Other);
	virtual ~CDataArray();

private:
	SSI_INT64 AccessCtr;
public:
	CData* GetNextData(DimNode& Dim, SSI_BOOL &EOL, SSI_BOOL bReset = 0, SSI_BOOL bIncludeNULLs = 0);
	DimNode GetDims(void);
};

#endif // !defined(AFX_DATAARRAY_H__5CEBBB03_5697_45BF_BE31_0221DE8901FA__INCLUDED_)



